#include <iostream>
#include <vector>
#include <algorithm>
using namespace  std;
class Solution {
public:
	vector<int> nextGreaterElement(vector<int>& findNums, vector<int>& nums) 
	{
		vector<int> ret(findNums.size(),0);
		for(int i=0;i<findNums.size();++i)
		{
			ret[i] = [&](int n)
			{
				auto it = find(nums.begin(), nums.end(), n);
				for (; it != nums.end(); ++it)
					if (*it > n)
						return *it;
				return -1;
			}(findNums[i]);
		}
		return ret;
	}
};
int main()
{
	
}